#include <vector>
#include <iostream>

using namespace std;

class Solution {
public:
    int findMin(vector<int>& nums) {
        if (nums.size() == 0) {
            return 0;
        }
        int begin = 0;
        int end = nums.size() - 1;
        while (begin < end) {
            int middle = (begin + end) / 2;
            if (nums[middle] > nums[end]) {
                if (end - begin == 1) {
                    begin = middle + 1;
                } else {
                    begin = middle;
                }
            } else {
                end = middle;
            }
        }
        return nums[begin];
    }
};

int main() {
    vector<int> input = {};
    Solution solution;
    int output = solution.findMin(input);
    cout << output << endl;
}

